-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use interactive buttons to display and send (toggle) reactions #168
Use interactive buttons to display and send (toggle) reactions #168
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, much appreciated!
please follow whitespace conventions, as it makes the code more readable. I added comments to some of the places where you're not doing it, but there are many more in room_reaction_list.rs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Alan, things are looking pretty good now!
There is still a key feature that we need, which seems to be missing (?): two different colors for buttons.
- one color for emphasis, which will be used for the buttons that represent reactions the current user has sent themselves.
- a different color for non-emphasis, which will be used for buttons that represent reactions the user has not sent, i.e., reactions from others.
Also, can you provide a demo video / test case of this PR properly supporting wrapping the list of reaction buttons to a new line? I see that implemented in the ReactionList::draw_walk()
fn but it has historically been difficult to implement properly.
Another thought I had was: can we reuse an existing Makepad widget instead of trying to roll our own list of buttons for the ReactionList
? Seems like this should be a fundamental widget type, since it's just a set of buttons that wrap.
If not, we should discuss this with Rik/Julian to see if your work here could be contributed to the upstream Makepad repo, since i'm sure others would want to use your code here for a wrappable list of buttons.
Here is the clip that features the wrap |
awesome, very nice work! can you add some more left & right padding to each button? maybe |
ok, thanks for the feedback. I might be making a generic wrap list button widget that is more composable. |
Sounds good. but kindly save that for later. For now, all you need to do is address the above comments and then we can merge this in as-is. Thanks! |
Blocked on Makepad problem: #168 (comment) |
Merged in main. |
There are quite a few UI & UX issues still remaining. Have you tested this thoroughly? If not, please do so, since there are likely even more issues lurking under the surface. Screenshot showing some issues: Some of the problems are:
The tooltip is nice, but is split across too many lines, making it hard to read. It should only be split into two lines by default (with the first line being "UserName reacted with:"), and should only spill over to more than 2 lines if the text is really really long. |
Here is updated version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job redesigning the reaction buttons! They look very nice & professional now.
I also made a small commit of my own to fix the alignment of the tooltip as well as make the font size slightly larger.
There are a few very small things I'd like you to fix before I merge this in.
First, please make the callout arrow longer, maybe like 30-50% longer.
Second, the positioning of the callout triangle is a bit inconsistent. I think the easiest way to fix this is to make it vertically centered regardless of how many lines of text there are in the tooltip, but if you don't like that design then we can discuss other options, such as aligning the triangle vertically with the first (or last) line of text inside of the tooltip.
Here's an example of what I mean. It looks perfect for a 2-line tooltip, but it looks kind of bad for a 1-line tooltip or a 3-line tooltip:
Align the callout to the first line of the tooltip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, looks great! Thanks very much.
Fixes #115
Fixes #115
Screen.Recording.2024-10-01.224004.mp4
Uploading wrap.mp4…